1. Field of the Invention
Embodiments of the present invention relate generally to initialization and, more specifically, to initializing a graphics processing unit (GPU) using a ROM-based initialization unit and a programmable microcontroller.
2. Description of the Related Art
Certain advanced computer systems augment the processing capabilities of a general purpose CPU with a specialty processor, such as a graphics processing unit (GPU). Typically, in such architectures, the GPU is initialized to configure the GPU in a predefined way before a communication link, such as a Peripheral Component Interconnect Express (PCIe®) link, is established. One conventional way to initialize the GPU is by reading instructions from a read-only memory (ROM) external to the GPU and performing write operations to registers within the GPU according to those instructions. Specifically, an initialize-from-ROM component (IFR), triggered to execute at a predefined time after reset, performs the register write operations after determining that the ROM exists. When the IFR finishes writing to the registers, the IFR releases a holdoff on the communication link, allowing communication to occur. For PCIe devices, releasing the holdoff allows LTSSM link training to begin and typically only occurs after the IFR finishes its register write operations so as to ensuring that these writes cannot be interfered with by other programs or processes within the broader system.
Such a conventional approach, in which link training begins only after all register write operations are complete, is not robust against errors and cannot be debugged. In particular, because PCI link training begins only after the register writes have been completed, any error preventing the write operations from completing cannot be identified. Further, because the IFR only reads from the ROM and writes to the registers, individual register addresses have to be coded within the ROM, thereby necessitating a large ROM. In addition, the IFR is typically not able to provide additional functionality such as read-modify-write operations, polling operations, branching, and time delays, that could be useful for the initialization and debugging of the GPU.
As the foregoing illustrates, what is needed in the art is a more effective way to initialize a GPU that addresses one or more of the drawbacks discussed above.